﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActivitiesList.aspx.cs" Inherits="CRM.Web.EventManagement.ActivitiesList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".cbAll").live("click", function() {
                if ($(this).children().eq(0).attr("checked") == "checked") {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", "checked");
                    });
                }
                else {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>
</head>
<body>
<form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
            <tr>
                <td class="left">
                    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
                </td>
                <td class="middle">
                    <div class="pagetitle">
                        <div>
                            <asp:Label ID="lblTitle" runat="server" Text="外呼活动设定"></asp:Label></div>
                    </div>
                </td>
                <td class="right">
                    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
                </td>
            </tr>
        </table>
    <div id="divMain" >
    <div style="width: 100%">
        <div class="listdiv">
            <asp:PlaceHolder runat="server" ID="phSearch">
                <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                    <tr>
                        <td class="title">
                            <div  class="nowrap">
                                活动编号:</div>
                        </td>
                        <td class="content">
                            <div style="white-space: nowrap;">
                                <asp:TextBox ID="txtTASK_ID" runat="server" CssClass="txt"></asp:TextBox></div>
                        </td>
                        <td class="title">
                            <div  class="nowrap">
                                活动名称:</div>
                        </td>
                        <td class="content">
                            <div style="white-space: nowrap;">
                                <asp:TextBox ID="txtTASK_NAME" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                                    TextMode="SingleLine"></asp:TextBox></div>
                        </td>
                        <td class="title">
                           <div  class="nowrap">
                                活动状态:</div>
                        </td>
                        <td class="content">
                            <div style="white-space: nowrap;">
                                <asp:DropDownList ID="ddlSTATUS" runat="server" CssClass="ddl">
                                </asp:DropDownList>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            <div  class="nowrap">
                                创建时间:</div>
                        </td>
                        <td class="content">
                            <div style="white-space: nowrap;">
                                <asp:TextBox ID="txtCREATETIMEBegin" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>-<asp:TextBox
                                    ID="txtCREATETIMEEnd" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox></div>
                        </td>
                        <td class="title">
                        </td>
                        <td class="content">
                        </td>
                    </tr>
                    <tr>
                        <td class="content" colspan="6">
                            <div style="white-space: nowrap; width: 300px;">
                                <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn"
                                    OnClick="btnSearch_Click" />
                            </div>
                        </td>
                        <td class="title">
                        </td>
                        <td class="content">
                        </td>
                        <td class="title">
                        </td>
                    </tr>
                </table>
            </asp:PlaceHolder>  
            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" 
                AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" 
                OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="True" 
                AllowSorting="True"  SortExpressionValue="TASK_ID"  
                SortDirectionValue="DESC" >
                <Columns>
			    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                    <div style="white-space: nowrap;">
                    <asp:HyperLink id="hlModify" runat="server" NavigateUrl='<%# Eval("TASK_ID", ModifyUrl) %>'>详细</asp:HyperLink>
                    <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                    <asp:HyperLink id="HyperLink1" runat="server" Target="_blank" NavigateUrl='<%# Eval("TASK_ID", "SelectList.aspx?TASK_ID={0}") %>'>名单抽取</asp:HyperLink>
                    <asp:HyperLink id="HyperLink3" runat="server" Target="_blank" NavigateUrl='<%# Eval("TASK_ID", "AdvancedExtract.aspx?TASK_ID={0}&PageTarget=Opener") %>'   >高级抽取</asp:HyperLink>
                    </div>
				    </itemtemplate>
                </asp:TemplateField>
			        <asp:TemplateField HeaderText="活动编号" SortExpression="TASK_ID">
                        <ItemTemplate>
                    <asp:HyperLink id="hlModifyTASK_ID" runat="server" NavigateUrl='<%# Eval("TASK_ID", ModifyUrl) %>' Text='<%# Bind("TASK_ID") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>		     
		        <asp:BoundField DataField="TASK_NAME" HeaderText="活动名称"  SortExpression="TASK_NAME" />
		        <asp:BoundField DataField="TASK_TABLE_NAME" HeaderText="活动表名"  SortExpression="TASK_TABLE_NAME" />
		        <asp:BoundField DataField="SDATE_PLAN" HeaderText="活动开始日期"  SortExpression="SDATE_PLAN"  DataFormatString="{0:yyyy-MM-dd}"/>
		        <asp:BoundField DataField="EDATE_PLAN" HeaderText="活动结束日期"  SortExpression="EDATE_PLAN" DataFormatString="{0:yyyy-MM-dd}"/>
		        <asp:BoundField DataField="TASK_TYPE" HeaderText="活动类型"  SortExpression="TASK_TYPE" />
		        <asp:BoundField DataField="STATUS" HeaderText="活动状态"  SortExpression="STATUS" />
		        <asp:BoundField DataField="SURVEY_ID" HeaderText="问卷编号"  SortExpression="SURVEY_ID" />
		        <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID"  Visible="false" />
		        <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE" />
		        <asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME" DataFormatString="{0:yyyy-MM-dd}"/>
		        <asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号"  SortExpression="LASTMODIFYPEOPLEID"  Visible="false" />
		        <asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人"  SortExpression="LASTMODIFYPEOPLE"  Visible="false" />
		        <asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间"  SortExpression="LASTMODIFYTIME" Visible="false" />
		        <asp:BoundField DataField="BUSINESSDIVISIONCODE" HeaderText="事业部编码"  SortExpression="BUSINESSDIVISIONCODE"  Visible="false" />
		        <asp:BoundField DataField="BUSINESSDIVISIONNAME" HeaderText="事业部名称"  SortExpression="BUSINESSDIVISIONNAME" />
		        <asp:BoundField DataField="IFEND" HeaderText="是否有结束日期"  SortExpression="IFEND" />
		        <asp:BoundField DataField="REMARKS" HeaderText="描述信息"  SortExpression="REMARKS" />
                </Columns>	
                <RowStyle CssClass="row" />
                <AlternatingRowStyle CssClass="row2" />
                <HeaderStyle CssClass="header" />	
                <PagerStyle CssClass="pager" />	
            </dp:WebGridView>
        </div>
    </div>
</div>
</form>
</body>
</html>
